﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Yuyi.PluginForJS.JavaScriptParser
{
    public class Nodes
    {
        /// <summary>
        /// 未知
        /// </summary>
        public const int Unknow = -1;
        /// <summary>
        /// 根
        /// </summary>
        public const int program = 0;
        /// <summary>
        /// 元素
        /// </summary>
        public const int sourceElements = 1;
        /// <summary>
        /// function，第一个子节点为参数
        /// </summary>
        public const int sourceElement = 2;
        /// <summary>
        /// 参数列表
        /// </summary>
        public const int functionDeclaration = 3;
        /// <summary>
        /// 方法体
        /// </summary>
        public const int functionExpression = 4;
        /// <summary>
        /// 方法参数
        /// </summary>
        public const int formalParameterList = 5;

        public const int functionBody = 6;

        public const int statement = 7;

        public const int statementBlock = 8;
        /// <summary>
        /// var a = function(c,d){...}
        /// </summary>
        public const int statementList = 9;
        public const int variableStatement = 10;
        public const int variableDeclarationList = 11;
        public const int variableDeclarationListNoIn = 12;
        public const int variableDeclaration = 13;
        public const int variableDeclarationNoIn = 14;

        public const int emptyStatement = 15;
        public const int expressionStatement = 16;
        public const int ifStatement = 17;
        public const int doWhileStatement = 18;
        public const int whileStatement = 19;
        public const int forStatement = 20;

        public const int Identifier = 21;

        public const int Empty = 22;
        public const int Break = 23;
        public const int Continue = 24;
        public const int ForIn = 25;
        public const int For = 26;
        public const int Label = 27;
        public const int If = 28;
        public const int Do = 29;
        public const int Return = 30;
        public const int Switch = 31;
        public const int Default = 32;
        public const int Throw = 33;
        public const int Try = 34;
        public const int Catch = 35;
        public const int Finally = 36;
        public const int Var = 37;
        public const int Declaration = 38;
        public const int Conditional = 39;
        public const int Group = 40;
        public const int Comma = 41;
        public const int With = 42;
        public const int While = 43;
        public const int Delete = 44;
        public const int Not = 45;
        public const int Minus = 46;
        public const int Pre_Decrement = 47;
        public const int Plus = 48;
        public const int Pre_Increment = 49;
        public const int BitwiseComplement = 50;
        public const int TypeOf = 51;
        public const int Void = 52;
        public const int Post_Increment = 53;
        public const int Post_Decrement = 54;
        public const int Construct = 55;
        public const int Get_Property = 56;
        public const int Get_Element = 57;
        public const int Invoke = 58;
    }
}
